package com.example.supplychainbackend.controller.dto.purchase;

import jakarta.persistence.CascadeType;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.OneToMany;
import lombok.*;

import java.util.List;

@Getter
@Setter
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class PurchaseOrderDto {
    private String purchaseOrderNumber;

    private Integer status;
    private String salesOrderName;
    private String contractNumber;
    private String contractName;
    private String supplierCode;
    private String supplierName;
    private Float totalAmountWithTax;
    private String plannedEarliestDeliveryDate;
    private String promisedDeliveryDate;
    private String supplierRemarks;
    private String headerRemarks;
    private String lastUpdateDate;
    private String supplierOrderNumber;
    private Integer orderType;
    private Float payableQuantity;
    private String purchaser;
    private String orderCreator;
    private String orderDate;
    private Integer purchaseType;
    private String recentApprovalTime;
    private Integer paymentMethod;
    private String localCurrency;
    private String paymentCycle;
    private String originalCurrency;
    private Float exchangeRate;
    private String tradeTerms;
    private String destination;
    private String email;
    private String shippingAddress;
    private String detailAddress;
    private String companyCodeName;
    private String factoryName;
    private String paymentNotes;

    private String salesOrderNumber;
    private String plannedDeliveryDate;
    private String contractType;

    @OneToMany(cascade = CascadeType.ALL, orphanRemoval = true)
    @JoinColumn(name = "purchase_order_number")
    private List<PurchaseMaterialDto> materialList;

    String	userName;
    String	enterpriseName;
    Boolean	onChain;
    String	transactionId;
    String	commitTime;
    String	userId;
    String	enterpriseId;
}
